// Copyright 2009 sbva project
//
// This file is part of sbva,
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.googlecode.sbva.example.businessobjects;

import com.googlecode.sbva.example.businessobjects.validator.ValidZipCode;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 */
public class Address implements Serializable {

   @NotNull(message="struts://error.input.required/?0=create.user.address.address")
   @Size(min=1, message="struts://error.size.invalid/?0=create.user.address.address&1={min}&2={max}")
   private String address0;
   private String address1;
   private String aptOrSuite;
   @NotNull(message="struts://error.input.required/?0=create.user.address.city")
   @Size(min=1, max=40, message="struts://error.size.invalid/?0=create.user.address.city&1={min}&2={max}")
   private String city;
   @NotNull(message="struts://error.input.required/?0=create.user.address.state")
   @Size(min=2, message="struts://error.size.invalid/?0=create.user.address.state&1={min}&2={max}")
   private String state;
   @NotNull(message="struts://error.input.required/?0=create.user.address.zip")
   @ValidZipCode
   private String zip;

   public String getAddress0() {
      return address0;
   }

   public void setAddress0(String address0) {
      this.address0 = address0;
   }

   public String getAddress1() {
      return address1;
   }

   public void setAddress1(String address1) {
      this.address1 = address1;
   }

   public String getAptOrSuite() {
      return aptOrSuite;
   }

   public void setAptOrSuite(String aptOrSuite) {
      this.aptOrSuite = aptOrSuite;
   }

   public String getCity() {
      return city;
   }

   public void setCity(String city) {
      this.city = city;
   }

   public String getState() {
      return state;
   }

   public void setState(String state) {
      this.state = state;
   }

   public String getZip() {
      return zip;
   }

   public void setZip(String zip) {
      this.zip = zip;
   }
}
